$OpenBSD: patch-src_getopt_long_c,v 1.1 2017/04/17 14:32:55 espie Exp $
--- src/getopt_long.c.orig	Mon Apr 17 00:45:00 2017
+++ src/getopt_long.c	Mon Apr 17 00:45:17 2017
@@ -66,11 +66,11 @@ puts_argv(char **argv)
 #include <stdio.h>
 #include <getopt_long.h>
 
-char *optarg;
-int optind;
+extern char *optarg;
+extern int optind;
 
-int opterr;
-int optopt;
+extern int opterr;
+extern int optopt;
 
 /*
   return value 0: no option (include '-')
